<div class="layui-fluid">
    <div class="layui-card">
      <div class="layui-card-body">
        <form class="layui-form" action="<{:url('customer/add')}>">
            <input type="hidden" name="id" value="<{$info['id']}>">
            <div class="layui-form-item">
              <label class="layui-form-label">分类</label>
              <div class="layui-input-block">
                    <select name="cat_id" required lay-verify="required">
                        <option value="">请选择分类</option>
                      <{volist name="catlist" id="v"}>
                          <option value="<{$v.id}>" <{if $info['cat_id']==$v['id']}>selected<{/if}>><{for start="0" end="$v.depath"}>&nbsp;&nbsp;&nbsp;&nbsp;<{/for}>|-<{$v.title}></option>
                      <{/volist}>
                    </select>
              </div>
            </div>

            <div class="layui-form-item">
              <label class="layui-form-label">客户姓名</label>
              <div class="layui-input-block">
                <input type="text" name="name" value="<{$info['name']}>" required lay-verify="required" placeholder="请输入客户姓名" autocomplete="off" class="layui-input">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">客户公司名称</label>
              <div class="layui-input-block">
                <input type="text" name="company_name" value="<{$info['company_name']}>" required lay-verify="required" placeholder="请输入客户公司名称" autocomplete="off" class="layui-input">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">客户国家</label>
              <div class="layui-input-block">
                <input type="text" name="country" value="<{$info['country']}>" required lay-verify="required" placeholder="请输入客户国家" autocomplete="off" class="layui-input">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">客户电话</label>
              <div class="layui-input-block">
                <input type="text" name="phone" value="<{$info['phone']}>" required lay-verify="required" placeholder="请输入客户电话" autocomplete="off" class="layui-input">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">客户Email</label>
              <div class="layui-input-block">
                <input type="text" name="email" value="<{$info['email']}>" required lay-verify="required" placeholder="请输入客户Email" autocomplete="off" class="layui-input">
              </div>
            </div>
            
            <div class="layui-form-item">
              <label class="layui-form-label">封面图</label>
              <div class="layui-input-block">
                  <button type="button" class="layui-btn" id="myupimg">
                    <i class="layui-icon">&#xe67c;</i>上传图片
                  </button>
                  <input type="hidden" name="pic" value="<{$info['pic']}>" />
                  <div style="display:inline-block;position:relative;">
                      <span style="position:absolute;right:-15px; top:-15px;cursor:pointer;color:#ccc;font-size:24px;<{if !$info['pic']}>display:none;<{/if}>" id="closeimg">x</span>
                      <img id="pic" height=120 src="<{$info['pic']}>" />
                  </div>
              </div>
            </div>
            
            <div class="layui-form-item">
              <label class="layui-form-label">内容</label>
              <div class="layui-input-block">
                  <script id="container" name="detail" type="text/plain"><{:htmlspecialchars_decode($info['detail'])}></script>
              </div>
            </div>
          <div class="layui-form-item">
            <div class="layui-input-block">
              <button class="layui-btn" lay-submit lay-filter="myform">立即提交</button>
              <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
          </div>
        </form>
      </div>
    </div>
</div>
<script>
layui.use(['form'], function(){
  var $ = layui.$
  ,form = layui.form;
  form.render();

  var ue = UE.getEditor('container');
});
</script>
